import modalAttr from '@/libs/modal-attr';
import modalIcon from '@/libs/modal-icon';
import modalParserFrom from '@/libs/modal-parserFrom';
import modalSure from '@/libs/modal-sure';
import timeOptions from '@/libs/timeOptions';
import dialog from '@/libs/dialog';
import scroll from '@/libs/loading';
import * as Auth from '@/libs/wechat';
import * as constants from '@/utils/constants.js';
import * as selfUtil from '@/utils/ZBKJIutil.js';
import schema from 'async-validator';
import { parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels, handleTree } from '@/utils/parsing';

export default {
  install(Vue) {
    Vue.prototype.$modalSure = modalSure;
    Vue.prototype.$modalAttr = modalAttr;
    Vue.prototype.$modalIcon = modalIcon;
    Vue.prototype.$modalParserFrom = modalParserFrom;
    Vue.prototype.$timeOptions = timeOptions;
    Vue.prototype.$dialog = dialog;
    Vue.prototype.$scroll = scroll;
    Vue.prototype.$wechat = Auth;
    Vue.prototype.$constants = constants;
    Vue.prototype.$selfUtil = selfUtil;
    Vue.prototype.handleTree = handleTree;
    Vue.prototype.parseTime = parseTime;
    Vue.prototype.resetForm = resetForm;
    Vue.prototype.$validator = function (rule) {
      return new schema(rule);
    };
  },
};
